﻿using Models.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using yymbDAL;

namespace yymbBLL
{
    public class MySetManger
    {
        private MySetService db;
        public MySetManger()
        {
            db = new MySetService();
        }
        /// <summary>
        /// 显示基本信息表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Information ShowInfo(int id)
        {
            return db.ShowInfo(id);
        }
        /// <summary>
        /// 修改基本信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool SetInfo(Information info)
        {
            return db.SetInfo(info) > 0;
        }
        /// <summary>
        /// 显示旧密码
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public string ShowPwd(int id)
        {
            return db.ShowPwd(id);
        }
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public bool SetPwd(User user)
        {
            return db.SetPwd(user) > 0;
        }
        /// <summary>
        /// 显示教育信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Education ShowEduc(int id)
        {
            return db.ShowEduc(id);
        }
        /// <summary>
        /// 修改教育信息
        /// </summary>
        /// <param name="educ"></param>
        /// <returns></returns>
        public bool SetEduc(Education educ)
        {
            return db.SetEduc(educ) > 0;
        }
        /// <summary>
        /// 显示教育信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Occupation ShowOccupa(int id)
        {
            return db.ShowOccupa(id);
        }
        /// <summary>
        /// 修改教育信息
        /// </summary>
        /// <param name="occupa"></param>
        /// <returns></returns>
        public bool SetOccupa(Occupation occupa)
        {
            return db.SetOccupa(occupa) > 0;
        }
    }
}
